﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using Gpearce.Model;

namespace Gpearce.ViewModel
{
    public class YouTubeViewModel : INotifyPropertyChanged
    {
        public YouTubeViewModel()
        {
            this.Items = new ObservableCollection<YouTubeVideoInfo>() { new YouTubeVideoInfo() { Title = "testTitle", Description = "testDescription", PostedDate = new DateTime(2012, 09, 23) }};
        }
       
        public ObservableCollection<YouTubeVideoInfo> Items { get; private set; }

        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
